package com.web.app.common.support;

import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface CommonService {

	public int save(String sql, Object... args) throws SQLException, IOException;

	public int update(String sql, Object... args) throws SQLException, IOException;

	public int delete(String sql, Object... args) throws SQLException, IOException;

	public List<Map<String, Object>> findAll(String sql, Object... args) throws SQLException, IOException;

	public <T> List<T> findAll(Class<T> clazz, String sql, Object... args) throws SQLException, IOException;

	public Map<String, Object> findObject(String sql, Object... args) throws SQLException, IOException;

	public <T> T findObject(Class<T> clazz, String sql, Object... args) throws SQLException, IOException;

	public List<Map<String, Object>> findPagingList(String sql, int start, int limit, Object... args) throws SQLException,
	        IOException;

	public <T> List<T> findPagingList(Class<T> clazz, String sql, int start, int limit, Object... args)
	        throws SQLException, IOException;

}
